package sv.gob.mh.dgii.model;

// Generated Apr 28, 2010 4:04:55 PM by Hibernate Tools 3.3.0.GA

import java.io.Serializable;
import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GoCasoTecnicoGestion generated by hbm2java
 */
@Entity
@Table(name = "GO_CASO_TECNICO_GESTION", schema = "GESOMISOS")
public class GoCasoTecnicoGestion implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8508736317537234275L;
	private GoCasoTecnicoGestionId id;
	private GoEstado goEstado;
	private GoCasoTecnico goCasoTecnico;
	private GoGestion goGestion;
	private Date fhIngreso;
	private Date fhContacto;
	private String cdiccionario;
	private String sobservacion;

	public GoCasoTecnicoGestion() {
	}

	public GoCasoTecnicoGestion(GoCasoTecnicoGestionId id,
			GoCasoTecnico goCasoTecnico) {
		this.id = id;
		this.goCasoTecnico = goCasoTecnico;
	}

	public GoCasoTecnicoGestion(GoCasoTecnicoGestionId id,
			GoCasoTecnico goCasoTecnico, Date fhIngreso, 
			GoGestion goGestion, String sobservacion) {
		this.id = id;
		this.goCasoTecnico = goCasoTecnico;
		this.fhIngreso = fhIngreso;
		this.goGestion = goGestion;
		this.sobservacion = sobservacion;
	}

	/**
	 * @return the id
	 */
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "ncaso", column = @Column(name = "N_CASO", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "cplanes", column = @Column(name = "C_PLANES", nullable = false, precision = 3, scale = 0)),
			@AttributeOverride(name = "itecnico", column = @Column(name = "I_TECNICO", nullable = false, precision = 10, scale = 0)),
			@AttributeOverride(name = "ngestion", column = @Column(name = "N_GESTION", nullable = false, precision = 18, scale = 0)) })
	public GoCasoTecnicoGestionId getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(GoCasoTecnicoGestionId id) {
		this.id = id;
	}

	/**
	 * @return the goEstado
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_ESTADO", nullable = false)
	public GoEstado getGoEstado() {
		return goEstado;
	}

	/**
	 * @param goEstado
	 *            the goEstado to set
	 */
	public void setGoEstado(GoEstado goEstado) {
		this.goEstado = goEstado;
	}

	/**
	 * @return the goCasoTecnico
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "N_CASO", referencedColumnName = "N_CASO", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "C_PLANES", referencedColumnName = "C_PLANES", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "I_TECNICO", referencedColumnName = "I_TECNICO", nullable = false, insertable = false, updatable = false) })
	public GoCasoTecnico getGoCasoTecnico() {
		return goCasoTecnico;
	}

	/**
	 * @param goCasoTecnico
	 *            the goCasoTecnico to set
	 */
	public void setGoCasoTecnico(GoCasoTecnico goCasoTecnico) {
		this.goCasoTecnico = goCasoTecnico;
	}

	/**
	 * @return the goGestion
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_GESTION", nullable = false)
	public GoGestion getGoGestion() {
		return goGestion;
	}

	/**
	 * @param goGestion
	 *            the goGestion to set
	 */
	public void setGoGestion(GoGestion goGestion) {
		this.goGestion = goGestion;
	}

	/**
	 * @return the fhIngreso
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhIngreso() {
		return fhIngreso;
	}

	/**
	 * @param fhIngreso
	 *            the fhIngreso to set
	 */
	public void setFhIngreso(Date fhIngreso) {
		this.fhIngreso = fhIngreso;
	}

	/**
	 * @return the fhContacto
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_CONTACTO", length = 7)
	public Date getFhContacto() {
		return fhContacto;
	}

	/**
	 * @param fhContacto
	 *            the fhContacto to set
	 */
	public void setFhContacto(Date fhContacto) {
		this.fhContacto = fhContacto;
	}

	/**
	 * @return the cdiccionario
	 */
	@Column(name = "C_DICCIONARIO", length = 1)
	public String getCdiccionario() {
		return cdiccionario;
	}

	/**
	 * @param cdiccionario
	 *            the cdiccionario to set
	 */
	public void setCdiccionario(String cdiccionario) {
		this.cdiccionario = cdiccionario;
	}

	/**
	 * @return the sobservacion
	 */
	@Column(name = "S_OBSERVACION", length = 1000)
	public String getSobservacion() {
		return sobservacion;
	}

	/**
	 * @param sobservacion
	 *            the sobservacion to set
	 */
	public void setSobservacion(String sobservacion) {
		this.sobservacion = sobservacion;
	}

}
